﻿//using DataAccess.DTO;
//using DataAccess.Models;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//using XYD.DataAccess;
//using XYD.Framework.Data;
//using XYD.Framework.Data.Dapper;

//namespace DataAccess.DAL
//{
//    public class ProductDAL : BaseDAL
//    {
//        public Product Get(int id)
//        {
//            return CONN_TopicSharing.Get<Product>(id);
//        }

//        public bool Insert(Product Product)
//        {
//            return CONN_TopicSharing.Insert<Product>(Product);
//        }

//        public bool Update(Product Product)
//        {
//            return CONN_TopicSharing.Update<Product>(Product);
//        }

 
//        public Product Get(string Productname)
//        {
//            string sql = string.Format(" select * from Product where Productname='{0}' ", Productname);

//            Product Product = CONN_TopicSharing.Get<Product>(sql);

//            return Product;
//        }
        
//        public List<Product> ListPage(string strWhere, string orderbys, int pagesize, int pageindex, out int count)
//        {
//            List<Product> Product = new List<Product>();
//            if (string.IsNullOrEmpty(strWhere))
//            {
//                strWhere = " is_delete=0 ";
//            }

//            if (string.IsNullOrEmpty(orderbys))
//                orderbys = "id";

//            Product = CONN_TopicSharing.SQLPager<Product>("*", " Product ", strWhere, "", "", orderbys, pagesize, pageindex, out count, null).ToList();

//            return Product;
//        }
//    }
//}
